(function () {
  let myChart = echarts.init(document.querySelector(".box:nth-of-type(3)"));
  option = {
    legend: {
      right: "right",
      center: "center",
    },
    series: [
      {
        name: "Nightingale Chart",
        type: "pie",
        radius: [10, 80],
        center: ["30%", "50%"],
        roseType: "area",
        itemStyle: {
          borderRadius: 3,
        },
        data: [
          { value: 40, name: "实例 1" },
          { value: 38, name: "实例 2" },
          { value: 32, name: "实例 3" },
          { value: 30, name: "实例 4" },
          { value: 28, name: "实例 5" },
        ],
      },
    ],
  };
  // 步骤5：使用刚指定的配置项和数据显示图表
  myChart.setOption(option);

  // window.onresize = () => {
  //     myChart.resize()
  // }

  window.addEventListener("resize", () => {
    myChart.resize();
  });
})();
